package com.example.photography.fragment.focus;

import android.widget.EditText;

import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.photography.R;
import com.example.photography.adapter.focus.FocusAdapter;
import com.example.photography.bean.FocusBean;
import com.example.photography.common.BaseFragment;
import com.loopj.android.http.RequestParams;

import java.util.List;

import butterknife.BindView;

public class Focus_fragment extends BaseFragment {

    @BindView(R.id.rc_user)
    RecyclerView rcUser;

    private List<FocusBean.DataBean.RelationsBean> relationsBeans;
    private List<FocusBean.DataBean.FocussBean> focussBeans;

    public Focus_fragment(List<FocusBean.DataBean.RelationsBean> relationsBeans, List<FocusBean.DataBean.FocussBean> focussBeans) {
        this.relationsBeans = relationsBeans;
        this.focussBeans = focussBeans;
    }

    @Override
    protected RequestParams getParams() {
        return null;
    }

    @Override
    protected String getUrl() {
        return null;
    }

    @Override
    protected void initData(String content) {
        //装载适配器
        FocusAdapter focusAdapter = new FocusAdapter(getActivity(), relationsBeans, focussBeans);
        rcUser.setAdapter(focusAdapter);
        //设置布局管理者
        rcUser.setLayoutManager(new GridLayoutManager(getActivity(), 1));

    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_focus;
    }
}
